<template>
	<view>
		<button @click="tuichu">退出登录</button>
	</view>
</template>

<script>
	import {tcList} from "@/api/user.js"
	export default {
		data() {
			return {
			}
		},
		methods: {
		async tuichu(){
				const res=await tcList()
				console.log(res);
				uni.removeStorageSync("token")
				uni.removeStorageSync("user")
				uni.showToast({
					title:"退出成功"
				})
				uni.reLaunch({
					url:"/pages/my/my"
				})
			}
		}
	}
</script>

<style>

</style>
